1. Field of the Invention
The present invention relates generally to data processing and networking. More specifically, systems and methods are disclosed for using High-level Data Link Control (HDLC) channel context information to simultaneously process multiple HDLC channels.
2. Description of Related Art
High-level Data Link Control (HDLC) is a data link protocol that uses a unique bit sequence to delimit the start and end of each frame. In HDLC, frames are delimited by a sequence of bits known as a “flag.” The flag sequence is a unique 8-bit sequence of the form 01111110 (0×7e). The data link is always on: when there is no data to send, the link transmits an idle sequence.
The flag sequence should never occur within the content of a frame because it could otherwise be confused with an intentionally sent flag. A technique known as 0-bit insertion or 0-bit stuffing is used to prevent random data from synthesizing a flag. This technique is said to make HDLC transparent since any stream of bits may be present between the open and closing flag of a frame. If, for example, the flag sequence has six consecutive ones, transparency can be achieved by inserting a 0-bit after any sequence of five consecutive ones in the payload. In the receive direction, any sequence of five ones followed by a zero is deemed to have been bit-stuffed, and the zero bit is removed from the incoming bit stream.
An illustrative HDLC frame is shown in FIG. 1. As shown in FIG. 1, in addition to flags 102 and 112 and data section 108, HDLC frames also include a Frame Check Sequence (FCS) 110, which is a cyclic redundancy check calculation over a known polynomial using the unstuffed data in the frame. In addition, HDLC frames typically include address and control information 104, 106.
An application may have multiple logical HDLC connections running simultaneously (usually time-division multiplexed) at a relatively low speed. The device running the application will typically need the ability to terminate these connections, where “terminating” a connection refers to the process of encapsulating or de-encapsulating the data in an HDLC frame. However, conventional HDLC controllers impose limitations on the number of simultaneous HDLC channels that can be processed.